<!doctype html>
<html>
{include file="head.html"}

<body>

<div class="header" >
    <div  class="left-btn pointer goback"><span class="iconfont icon-back"></span></div>
    <div class="title">分类添加</div>
    
  </div>
<div class="main-body">
	<form id="form">
    	
        <input type="hidden" name="id" value="{$data.id}">
         
        <div class="input-row">
        	<input type="text" name="title" placeholder="分类名称"  value="{$data.title}" class="txt">
        </div>
        
        <div class="input-row">
        	<input type="text" name="orderindex" placeholder="排序" value="{$data.orderindex}" class="txt">
        </div>
        
        <div class="form-btns">
        	<button type="button" class="btn btn-row btn-success btn-larger" id="submit">保存</button>
        </div>
        
    </form>

</div>
<script>
$(function(){
	$("#submit").on("click",function(data){
		$.post("{$appshop}?m=shop_category&a=save&ajax=1",$("#form").serialize(),function(data){
			if(data.error){
				skyToast(data.message);
			}else{
				skyToast('保存成功');
			}
		})
	});
});

</script>
</body>
</html>
